<template>
    <div class="col-lg-6">
        <div class="ibox ">
            <div class="ibox-title">
                <h5>Line Chart Example </h5>
                <div class="ibox-tools">
                    <a class="collapse-link">
                        <i class="fa fa-chevron-up"></i>
                    </a>
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-wrench"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-user">
                        <li><a href="#" class="dropdown-item">Config option 1</a>
                        </li>
                        <li><a href="#" class="dropdown-item">Config option 2</a>
                        </li>
                    </ul>
                    <a class="close-link">
                        <i class="fa fa-times"></i>
                    </a>
                </div>
            </div>
            <div class="ibox-content">
                <div id="morris-line-chart"></div>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    name: 'MorrisChart',
    props: {

    },
    data() {
        return {

        }
    },
    methods: {
        render_morris: function() {
            /* eslint-disable */
            Morris.Line({
                element: 'morris-line-chart',
                data: [{ y: '1-1', a: 100, b: 90 },
                    { y: '1-2', a: 75, b: 65 },
                    { y: '1-3', a: 50, b: 40 },
                    { y: '1-4', a: 75, b: 65 },
                    { y: '1-5', a: 50, b: 40 },
                    { y: '1-6', a: 75, b: 65 },
                    { y: '1-7', a: 100, b: 90 } ],
                xkey: 'y',
                ykeys: ['a', 'b'],
                labels: ['Series A', 'Series B'],
                hideHover: 'auto',
                resize: true,
                lineColors: ['#54cdb4','#1ab394'],
            });
        }
    },
    mounted: function() {
        this.render_morris();
    }
}
</script>
